module top_module(
    input [31:0] a,
    input [31:0] b,
    input sub,
    output [31:0] sum
);
    wire cout_low;
    wire cout;
    wire [31:0] c;
     
    assign c=sub?(~b):b;
    
    add16 low(a[15:0],c[15:0],sub,sum[15:0],cout_low);
    add16 high(a[31:16],c[31:16],cout_low,sum[31:16],cout);
    
endmodule